package com.xiaojun.whut.Controller.log;

import com.alibaba.fastjson.JSON;
import com.xiaojun.whut.Entity.SysLog;
import com.xiaojun.whut.Repository.SysLogRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 鲁佳磊
 * @create 2020-11-05 1:15
 */
@RestController
public class LogInfoController {
    @Autowired
    private SysLogRepository sysLogRepository;

    @RequestMapping("/getAllLogInfo")
    public String getAllLogInfo(){
        List<SysLog> allInfo = sysLogRepository.getAllInfo();
        return JSON.toJSONString(allInfo);
    }
}
